<template>
  <div class="data-list">
    <el-card class="box-card">
      <div class="card-item">
        <i class="el-icon-s-order"></i>
        <span>数据列表</span>
      </div>
      <div class="card-item card-btn">
        <slot></slot>
        <el-button>{{btnText}}</el-button>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  name:"DataList",
  props:{
    btnText:{
      type:String,
      default:"添加"
    }
  }
}
</script>

<style scoped lang="less">
  .data-list{
    .box-card{
      .card-item{
        float: left;
        .el-icon-s-order{
          margin-right: 10px;
        }
      }   
      .card-btn{
        float: right;
        .el-button{
          position: relative;
          top: -10px;
        }
      }
    }
  }

  /deep/ .el-card__body{
    height: 22px;
  }
</style>